.class Les/ik;
.super Les/fk;
.source "AdVideoViewHolder.java"


# instance fields
.field k:Landroid/widget/FrameLayout;


# direct methods
.method constructor <init>(Landroid/view/View;)V
    .locals 1

    .line 1
    invoke-direct {p0, p1}, Les/fk;-><init>(Landroid/view/View;)V

    const v0, 0x7f090d67

    .line 2
    invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/widget/FrameLayout;

    iput-object p1, p0, Les/ik;->k:Landroid/widget/FrameLayout;

    return-void
.end method

.method private static a(I)I
    .locals 1

    const/4 v0, 0x1

    if-eq p0, v0, :cond_1

    const/4 v0, 0x2

    if-eq p0, v0, :cond_0

    const p0, 0x7f0c020a

    return p0

    :cond_0
    const p0, 0x7f0c020c

    return p0

    :cond_1
    const p0, 0x7f0c020b

    return p0
.end method

.method static a(Landroid/view/ViewGroup;Lcom/kwad/sdk/api/KsNativeAd;Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;Les/bk;I)Landroid/view/View;
    .locals 8

    .line 1
    invoke-virtual {p0}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    invoke-static {p5}, Les/ik;->a(I)I

    move-result p5

    const/4 v1, 0x0

    invoke-virtual {v0, p5, p0, v1}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object p5

    .line 2
    new-instance v0, Les/ik;

    invoke-direct {v0, p5}, Les/ik;-><init>(Landroid/view/View;)V

    .line 3
    move-object v2, p5

    check-cast v2, Landroid/view/ViewGroup;

    move-object v3, v0

    move-object v4, p1

    move-object v5, p2

    move-object v6, p3

    move-object v7, p4

    invoke-static/range {v2 .. v7}, Les/fk;->a(Landroid/view/ViewGroup;Les/fk;Lcom/kwad/sdk/api/KsNativeAd;Lcom/estrongs/android/pop/app/ad/cn/AdType;Lcom/estrongs/android/pop/app/ad/cn/b;Les/bk;)V

    .line 4
    new-instance p2, Les/ik$a;

    invoke-direct {p2}, Les/ik$a;-><init>()V

    invoke-interface {p1, p2}, Lcom/kwad/sdk/api/KsNativeAd;->setVideoPlayListener(Lcom/kwad/sdk/api/KsNativeAd$VideoPlayListener;)V

    .line 5
    new-instance p2, Lcom/kwad/sdk/api/KsAdVideoPlayConfig$Builder;

    invoke-direct {p2}, Lcom/kwad/sdk/api/KsAdVideoPlayConfig$Builder;-><init>()V

    .line 6
    invoke-virtual {p2, v1}, Lcom/kwad/sdk/api/KsAdVideoPlayConfig$Builder;->videoSoundEnable(Z)Lcom/kwad/sdk/api/KsAdVideoPlayConfig$Builder;

    move-result-object p2

    const/4 p3, 0x1

    .line 7
    invoke-virtual {p2, p3}, Lcom/kwad/sdk/api/KsAdVideoPlayConfig$Builder;->dataFlowAutoStart(Z)Lcom/kwad/sdk/api/KsAdVideoPlayConfig$Builder;

    move-result-object p2

    .line 8
    invoke-virtual {p2}, Lcom/kwad/sdk/api/KsAdVideoPlayConfig$Builder;->build()Lcom/kwad/sdk/api/KsAdVideoPlayConfig;

    move-result-object p2

    .line 9
    invoke-virtual {p0}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;

    move-result-object p0

    invoke-interface {p1, p0, p2}, Lcom/kwad/sdk/api/KsNativeAd;->getVideoView(Landroid/content/Context;Lcom/kwad/sdk/api/KsAdVideoPlayConfig;)Landroid/view/View;

    move-result-object p0

    if-eqz p0, :cond_0

    .line 10
    invoke-virtual {p0}, Landroid/view/View;->getParent()Landroid/view/ViewParent;

    move-result-object p1

    if-nez p1, :cond_0

    .line 11
    iget-object p1, v0, Les/ik;->k:Landroid/widget/FrameLayout;

    invoke-virtual {p1}, Landroid/widget/FrameLayout;->removeAllViews()V

    .line 12
    iget-object p1, v0, Les/ik;->k:Landroid/widget/FrameLayout;

    invoke-virtual {p1, p0}, Landroid/widget/FrameLayout;->addView(Landroid/view/View;)V

    :cond_0
    return-object p5
.end method
